package 强化训练;

import java.util.Scanner;

public class 偶数的差最小的两个质数 {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int mid = num / 2;
        while(true){
            if(isSu(mid) && isSu(num - mid)){
                System.out.println(num - mid);
                System.out.println(mid);
                return;
            }
            mid--;
        }
    }
    public static boolean isSu(int num){
        for(int i = 2;i <= Math.sqrt(num);i++){
            if(num % i == 0) return false;
        }
        return true;
    }
}

